package com.gbei.center.oauth.mapper;

import com.gbei.center.oauth.model.AuthRefreshToken;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.common.Mapper;

@Component
public interface AuthRefreshTokenMapper extends Mapper<AuthRefreshToken> {

    /**
     * 通过tokenId查询记录
     * @param tokenId tokenId
     * @return AuthRefreshToken
     */
    AuthRefreshToken selectByTokenId(@Param("tokenId") Integer tokenId);

    /**
     * 通过Refresh Token查询记录
     * @param refreshToken Refresh Token
     * @return AuthRefreshToken
     */
    AuthRefreshToken selectByRefreshToken(@Param("refreshToken") String refreshToken);
}